package cn.bdqn.or.service;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import cn.bdqn.or.dao.UserMapper;
import cn.bdqn.or.pojo.User;

@Service
public class UserService {

	@Resource
	private UserMapper userMapper;


	public int deleteByPrimaryKey(Integer userid) {
		return userMapper.deleteByPrimaryKey(userid);
	}


	public int insert(User record) {
		return userMapper.insert(record);
	}


	public int updateByPrimaryKey(User record) {
		return userMapper.updateByPrimaryKey(record);
	}


	public int updatePasswordByUserid(String updatedPassword, Integer userid) {
		return userMapper.updatePasswordByUserid(updatedPassword, userid);
	}


	public List<User> selectByUserId(Integer userId) {
		return userMapper.selectByUserId(userId);
	}

	public List<User> queryByUserNameAndPassword(String userName, String password) {
		return userMapper.queryByUserNameAndPassword(userName, password);
	}
}


